<include file="Public/min-header" />
<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
<div class="wrapper">
    <include file="Public/breadcrumb" />
    <section class="content ">
        <!-- Main content -->
        <div class="container-fluid">
            <div class="pull-right">
                <a href="javascript:history.go(-1)" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>
                <a href="javascript:;" class="btn btn-default" data-url="http://www.tp-shop.cn/Doc/Index/article/id/1012/developer/user.html" onclick="get_help(this)"><i class="fa fa-question-circle"></i> 帮助</a>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><i class="fa fa-list"></i> 添加出厂设备信息</h3>
                </div>
                <div class="panel-body ">
                    <!--表单数据-->
                    <form method="post" id="handleposition" action="{:U('Admin/Equipment/equipment_save',array('id'=>$info['equipment_id']))}" 
                    enctype="multipart/form-data">
                        <!--通用信息-->
                        <div class="tab-content col-md-10">
                            <div class="tab-pane active" id="tab_tongyong">
                                <table class="table table-bordered">
                                    <tbody>
                                       <tr>
                                    <td class="col-sm-2">设备名称：</td>
                                    <td class="col-sm-8">
                                        <input type="text" class="form-control" name="equipment_name" value="{$info['equipment_name']}" >
                                                                      
                                    </td>
                                </tr>  
                                        <tr>
                                            <td>设备类型：</td>
                                            <td>
                                                <select name="equipment_type" class="input-sm">
                                                    <option value="1">儿童康复水疗设备</option>
                                                    <option value="2">成人康复水疗设备</option>
                                                    <option value="3">康复水疗辅助设备</option>
                                                    <option value="4">医疗康复训练设备</option>
                                                </select>
                                            </td>
                                        </tr>
                                        
                                <tr>
                                    <td class="col-sm-2">设备图片：</td>
                                    <td id="photo_box" class="col-sm-8">
                                        <if condition="!empty($info)">
                                            <img src="{$info[equipment_img]}" width="100%"/>
                                            <br />
                                            <button id="change_photo" class="btn btn-warning pull-right">更改图片</button>
                                        <else / >
                                            <input type='file' name='company_photo' />
                                        </if>
                                    </td>
                                </tr>   
                                       <tr>
                                    <td class="col-sm-2">设备短码：</td>
                                    <td class="col-sm-8">
                                        <input type="text" class="form-control" name="equipment_shortCode" value="{$info['equipment_shortcode']}" >
                                                                      
                                    </td>
                                </tr>  
                                        <tr>
                                    <td class="col-sm-2">设备资产号：</td>
                                    <td class="col-sm-8">
                                        <input type="text" class="form-control" name="equipment_assdtNumber" value="{$info['equipment_assdtnumber']}" >
                                                                      
                                    </td>
                                </tr>  
                                        <tr>
                                    <td class="col-sm-2">设备序列号：</td>
                                    <td class="col-sm-8">
                                        <input type="text" class="form-control" name="equipment_sequenceNumber" value="{$info['equipment_sequencenumber']}" >
                                                                      
                                    </td>
                                </tr>  
                                        <tr>
                                    <td class="col-sm-2">设备生产厂家：</td>
                                    <td class="col-sm-8">
                                        <input type="text" class="form-control" name="equipment_manufacturer" value="{$info['equipment_manufacturer']}" >
                                                                      
                                    </td>
                                </tr>  
                                  
                                    <tr>
                                            <td class="col-sm-2">设备使用位置</td>
                                           <td class="col-sm-8">
                                        <input type="text" class="form-control" name="equipment_position" value="{$info['equipment_position']}" >
                                                                      
                                    </td>
                                        </tr>
                                    </tbody>
                                    <tfoot>
                                        <tr>
                                            <td>
                                                <input type="hidden" name="act" value="{$act}">
                                                <input type="hidden" name="ad_id" value="{$info.ad_id}">
                                            </td>
                                            <td class="text-right">
                                                <input class="btn btn-primary" type="button" onclick="adsubmit()" value="保存">
                                            </td>
                                        </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </form>
                    <!--表单数据-->
                </div>
            </div>
        </div>
   

        
    </section>
</div>
<script>
function adsubmit() {
    $('#handleposition').submit();
}

$(document).ready(function() {

    $('#start_time').daterangepicker({
        format: "YYYY-MM-DD",
        singleDatePicker: true,
        showDropdowns: true,
        minDate: '2016-01-01',
        maxDate: '2030-01-01',
        startDate: '2016-01-01',
        locale: {
            applyLabel: '确定',
            cancelLabel: '取消',
            fromLabel: '起始时间',
            toLabel: '结束时间',
            customRangeLabel: '自定义',
            daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'],
            monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
            firstDay: 1
        }
    });

    $('#end_time').daterangepicker({
        format: "YYYY-MM-DD",
        singleDatePicker: true,
        showDropdowns: true,
        minDate: '2016-01-01',
        maxDate: '2030-01-01',
        startDate: '2016-01-01',
        /*
        startDate: moment().startOf('day'),
        endDate: moment(),
        minDate: '01/01/2014',    //最小时间
        maxDate : moment(), //最大时间
        dateLimit : {
            days : 30
        }, //起止时间的最大间隔
        showDropdowns : true,
        showWeekNumbers : false, //是否显示第几周
        timePicker : true, //是否显示小时和分钟
        timePickerIncrement : 60, //时间的增量，单位为分钟
        timePicker12Hour : false, //是否使用12小时制来显示时间
        ranges : {
            '最近1小时': [moment().subtract('hours',1), moment()],
            '今日': [moment().startOf('day'), moment()],
            '昨日': [moment().subtract('days', 1).startOf('day'), moment().subtract('days', 1).endOf('day')],
            '最近7日': [moment().subtract('days', 6), moment()],
            '最近30日': [moment().subtract('days', 29), moment()]
        },
        opens : 'right', //日期选择框的弹出位置
        buttonClasses : [ 'btn btn-default' ],
        applyClass : 'btn-small btn-primary blue',
        cancelClass : 'btn-small',
        format : 'YYYY-MM-DD HH:mm:ss', //控件中from和to 显示的日期格式
        separator : ' to ',
        */
        locale: {
            applyLabel: '确定',
            cancelLabel: '取消',
            fromLabel: '起始时间',
            toLabel: '结束时间',
            customRangeLabel: '自定义',
            daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'],
            monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
            firstDay: 1
        }
    });

});
</script>
</body>

</html>